home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / inrstex / inrsinputs / helphdr.tex (.txt) < prev    next >
LaTeX Document  |  1991-09-05  |  11KB  |  249 lines

  1. % -*-tex-*-
  2. % tex 1.1
  3. % special definitions
  4. \catcode`\@=11
  5. % subdocument macros fix 
  6. \def\lb{ \li $\bullet$ }
  7. \def\subdocumentmacros#1{\ifs@ubdocument #1 \fi\s@ubdocumentfalse}
  8. %simple line skip
  9. \def\ls{\vskip \baselineskip \noindent}
  10. %vphantom "bug"
  11. \def\sphantom#1{\setbox0=\hbox{#1} \setbox2=\null \ht2=\ht0 \dp2=\dp0 \box2}
  12. % INRS
  13. \def\INRS{INRS-\kern-.1emT\'el\'e\-com\-muni\-ca\-tions}
  14. %check form %will print in proof mode only
  15. \long\def\proofcheck#1{\ifproofmode \par Proofcheck: \par #1 \fi}
  16. \def\comhead#1{\penaltybreak{-1000}{2.8ex}\centerline{\sssheadfont #1}\smallskip\nobreak}
  17. \let\tex = \TeX    % its easier to type
  18. \def\inprint{INRSprint}
  19. \def\mtex{T\kern-.1667em\lower.5ex\hbox{\^E}\kern-.125emX}
  20. \def\texbook{\tex book}
  21. \def\plain{{\it plain}}
  22. \def\intex{INRS\mtex}
  23. \def\vrt{\hbox{\tt\char`\|}} % vertical line
  24. \def\dnArrow{\hbox{\tt\char'14}} % downward arrow
  25. \def\upArrow{\hbox{\tt\char'13}} % upward arrow
  26. \def\]{\hbox{\tt\char`\ }} % visible space
  27. %special boxits
  28. \def\hhboxit#1{\hbox{\vrule\vbox{\hrule\hbox{#1}\hrule}\vrule}}
  29. \def\hvboxit#1{\hbox{\vrule\vbox{\hrule\hbox{\vbox{#1}}\hrule}\vrule}}
  30. \def\vvboxit#1{\vbox{\hrule\hbox{\vrule\vbox{#1}\vrule}\hrule}}
  31. \def\vhboxit#1{\vbox{\hrule\hbox{\vrule\vbox{\hbox{#1}}\vrule}\hrule}}
  32. \let \hh=\hhboxit \let \vh=\vhboxit \let \vv=\vvboxit \let \hv=\hvboxit 
  33. %========== simple forms for prim,plain,ext ended commands =======
  34. \def\pri{\leavevmode\llap{$\bullet$\kern 5pt}\nobreak}
  35. \def\pla{\leavevmode\llap{$\diamond$\kern 5pt}\nobreak}
  36. \def\ext{\leavevmode\llap{$\star$\kern 5pt}\nobreak}
  37. %======== simple multicolumn for symbols and commands 
  38. % must fit on single page and have no inserts
  39. % will be balanced
  40. \newbox\simpgalleybox
  41. \newdimen\simphcolumnsize
  42. \newdimen\simpfirstoffset \simpfirstoffset = 1em
  43. \newtoks\simpcolumnsep \simpcolumnsep = {\vrule\hskip 2em\vrule}
  44. \newcount\simpnumcolumns 
  45. \def\setsimphsize{\setbox0=\hbox{\the\simpcolumnsep}
  46.                      \dimen0= \simpnumcolumns\wd0 %\the\dimen0
  47.                      \advance\dimen0 by -\wd0 %\the\dimen0
  48.                      \advance\dimen0 by \simpfirstoffset
  49.                      \dimen2 = \hcolumnsize %\the\dimen2
  50.                      \advance\dimen2 by -\dimen0 %\the\dimen0
  51.                      \divide\dimen2 by \simpnumcolumns
  52.                      \global\simphcolumnsize = \dimen2
  53.                      }
  54. \def\beginsimplemulticolumn{
  55.        \setbox\simpgalleybox = \vbox\bgroup \hsize\simphcolumnsize}
  56. \def\endsimplemulticolumn{ \egroup \dimen0 = \ht\simpgalleybox
  57.                            \advance\dimen0 by \dp\simpgalleybox
  58.                            \divide\dimen0 by \simpnumcolumns
  59.                            \advance\dimen0 by 0pt % size of split box
  60.                            \count255=1
  61.                            \splitmaxdepth=\maxdepth 
  62.                            \splittopskip=0pt
  63.                            \setbox2 = \vsplit\simpgalleybox to \dimen0
  64.                            \setbox0 = \hbox{\vbox to \dimen0{\unvbox2\vss}}
  65.                            \loop \ifnum \count255 < \simpnumcolumns
  66.                                   \setbox2 = \vsplit\simpgalleybox to\dimen0
  67.                   \setbox0 = \hbox{\unhbox0\the\simpcolumnsep
  68.                                     \vbox to \dimen0{\unvbox2\vss}}
  69.                                   \advance\count255 by 1
  70.                                 \repeat
  71.                            \centerline{\box0}}
  72. %use default values
  73. \def\beginthreecolumn{\begincolumns 3}
  74. \def\begintwocolumn{\begincolumns 2}
  75. \def\begincolumns#1{\par\simpnumcolumns= #1
  76.                       \simpfirstoffset = 10pt 
  77.                       \simpcolumnsep = {\hskip 2em}
  78.                       \setsimphsize
  79.                       \beginsimplemulticolumn \obeylines
  80.                       \advance\parskip by 0pt plus 2pt minus 2pt
  81.                       \parindent =0pt}
  82. \let\endthreecolumn=\endsimplemulticolumn
  83. \let\endmulticolumn=\endsimplemulticolumn
  84. \let\endtwocolumn = \endsimplemulticolumn
  85. %command followed by explanation or short example
  86. \newdimen\descrwd \descrwd = 2.5in
  87. \def\bshortcomlist{\begingroup$$\tabskip=1em plus 1fil 
  88.               minus 1fil\halign\bgroup##\dotfill&\quad 
  89.                   \vtop{\hsize \descrwd \veryraggedright\noindent\strut ##\strut} \cr}
  90. \def\eshortcomlist{\crcr \egroup$$\endgroup}
  91. % macros for verbatim scanning
  92. \chardef\bslash=`\\
  93. \chardef\other=12
  94. \def\space{\leavevmode\hskip.5emplus1ptminus1pt\relax}
  95. {\obeyspaces %makes a space active for inside def 
  96. \gdef\ttverbatim{\begingroup
  97. \def|{\char`\|}\catcode`\\=\other
  98. \catcode`\{=\other
  99. \catcode`\}=\other
  100. \catcode`\$=\other
  101. \catcode`\&=\other
  102. \catcode`\#=\other
  103. \catcode`\%=\other
  104. \catcode`\~=\other
  105. \catcode`\_=\other
  106. \catcode`\^=\other
  107. \catcode`\<=\other
  108. \catcode`\>=\other
  109. \parindent0pt\parskip0pt plus1pt%
  110. \obeyspaces\let =\space
  111. \obeylines\tt}}
  112. \def\hendgraf{\endgraf\leavevmode}
  113. \outer\def\begintt{\vskip-\baselineskip$$\let\par=\hendgraf\ttverbatim%
  114. \catcode`\|=0\ttfinish}
  115. {\catcode`\|=0 |catcode`|\=\other% | is temporary escape character
  116. |obeylines% end of line is active
  117. |gdef|ttfinish#1^^M#2\endtt{|vbox{#2}|endgroup$$|vskip-|baselineskip|noindent|ignorespaces}}
  118. {\catcode`\|=\active \gdef\g@et #1|{\gdef\text{#1}#1\endgroup 
  119.                   \ifindexit \makexref \fi \indexitfalse}}
  120. \catcode`\|=\active %defines | as an active character in the entire document
  121. {\obeylines \gdef|{\ttverbatim\spaceskip\ttglue\g@et}}
  122. %\def\ttspace{{\tt\hskip\ttglue}}
  123. %  ========= \ in \beginttverbatim ========
  124. \def\1{\char'134} 
  125. %More useful stuff from TeX manual Header
  126. \def\bull{\vrule height .9ex width .8ex depth -.1ex } % square bullet
  127. \def\SS{{\it SS}} % scriptscript style
  128. % \box\bigdot is a null box with a bullet at its reference point
  129. \newbox\bigdot \newbox\smalldot
  130. \setbox0=\hbox{$\vcenter{}$} % \ht0 is the axis height
  131. \setbox1=\hbox to 0pt{$\hss\bullet\hss$} % bullet is centered on the axis
  132. \setbox\bigdot=\vbox to 0pt{\kern-\ht1 \kern\ht0 \box1 \vss}
  133. \setbox1=\hbox to0pt{$\hss\cdot\hss$} % cdot is centered on the axis
  134. \setbox\smalldot=\vbox to0pt{\kern-\ht1 \kern\ht0 \box1 \vss}
  135. % \samplebox makes the outline of a box, with big dot at reference point
  136. \def\samplebox#1#2#3#4{% #1=ht, #2=dp, #3=wd, #4=text
  137.   {\setbox0=\vtop{\vbox to #1{\hbox to #3{}\vss}
  138.       \nointerlineskip
  139.       \vbox to #2{}}% now \box0 has the desired ht, dp, and wd
  140.     \hbox{\copy\bigdot
  141.       \vrule height.2pt depth.2pt width#3%
  142.       \kern-#3%
  143.       \makelightbox
  144.       \kern-#3%
  145.       \raise#1\vbox{\hbox to #3{\hss#4\hss}
  146.         \kern 3pt}}}}
  147. % \sampleglue makes glue between sample boxes
  148. \def\sampleglue#1#2{% #1=width, #2=text
  149.   \vtop{\hbox to #1{\xleaders\hbox to .5\varunit{\hss\copy\smalldot\hss}\hfil}
  150.     \kern3pt
  151.     \tabskip 0pt plus 1fil
  152.     \halign to #1{\hfil##\cr#2\cr}}}
  153. % indexing macros mods of texbook
  154. % there is an interaction between \beginttverbatim and indexing wrt ^ 
  155. % thus change of ^ active to \@ !!!!! 
  156. \def\indxx{\xref}
  157. \def\xref{\relax}
  158. \let\@=\indxx
  159. \newif\ifindexit 
  160. {\obeylines
  161. \gdef\makexref{{\def\space{ }\def^^M{*/*}% spaces are important
  162. \xdef\writeit{\write\ind@file{!\text!\space\string\indpg\space\noexpand\number\pageno.}}\writeit}}}
  163. \outer\def\indexingon{\openlistfile{ind}\def\xref{\indexittrue}}
  164.       
  165. \outer\def\indexingoff{\closelistfile{ind}\def\xref{\relax}}
  166. % Command description macro
  167. % Format will be 
  168. % \bc
  169. % |<command>|\par-- for input
  170. % nobreak
  171. % Block based description
  172. % bigbreak
  173. \def\beginblockmode {\begingroup\parindent=0pt
  174.         \parskip= \smallskipamount  
  175.         \def\nbr{\par\nobreak\smallskip}
  176.         \let\sbr=\smallbreak
  177.         \let\mbr=\bigbreak
  178.         \let\bbr=\bigbreak}
  179. \def\endblockmode{\par\endgroup}
  180. %multipoint eqalign
  181. \def\multieqalign#1{\,\vcenter{\openup\jot\m@th
  182.   \ialign{&\quad\strut\hfil$\displaystyle{##}$&$\displaystyle
  183.               {{}##}$\hfil\quad&##\crcr#1\crcr}}\,}
  184. \bookstyle
  185. %special changes for this book
  186. \def\cqu{}
  187. \newskip\qsk \qsk=3in plus 1fill
  188. \def\cquote#1#2{\par\vfill\leftskip=\qsk {\it #1}\par\bigskip{\bf #2}}
  189. \def\pslide #1//#2//{\vfill\hslide #1//#2//} 
  190. \def\chapterstartform{\ifodd\pageno \relax\else
  191.                                \line{}{\cqu\par\ejectpage}\fi
  192.                         \gdef\cqu{}\titlepagestyle}
  193. % modification of header format
  194. \def\leftheadertext{\line{\llap{\ssheadfont\folio\qquad}\def\cr{ }CHAPTER 
  195.                      \chnumform: \the\chaptername \hss}}
  196. \def\rightheadertext{\line{\hss\topmark\rlap{\ssheadfont\qquad\folio}}}
  197. \let\chapterhead=\chead
  198. \let\bookstyle=\relax % removes the second try
  199. \input texgrct %POSTCRIPT 
  200. \input inrssl%POSTCRIPT 
  201. \def\textpagestyle{}
  202. \inrsform
  203. \textform
  204. %boxexample
  205. \def\boxexample{
  206. \def\wid{{\tt wd}}
  207. \def\hei{{\tt ht}}
  208. \def\dpt{{\tt dp}}
  209. \def\boxpoint{\setbox2=\hbox{\vrule width 8pt height 3pt depth 5pt} \wd2 =0pt
  210.               \ht2=0pt \dp2=0pt \hskip -8pt \box2}
  211. \setbox4=\hbox{\hei}
  212. \def\vbrule{\vrule width 1pt}
  213. \def\hbrule{\hrule height 1pt}
  214. \setbox0=\hbox to 1.2in{\vbrule$\longleftarrow \hss \wid \hss\longrightarrow$\vbrule}
  215. \setbox8=\vbox to 2in{\offinterlineskip\hbox to \wd4{\hss$\uparrow$\hss}
  216.                \hbox to \wd4{\hss $\Bigg\vert$\hss}\vss
  217.                \hbox to \wd4{\hss \hei\hss}\vss
  218.                \hbox to \wd4{\hss $\Bigg\vert$\hss}
  219.                \hbox to \wd4{\hss$\downarrow$\hss}}
  220. \setbox6=\vbox{\hbox to \wd4{\hss$\uparrow$\hss}
  221.                \hbox to \wd4{\hss \dpt\hss}
  222.                \hbox to \wd4{\hss$\downarrow$\hss}}
  223. \bigbreak\line{\hss
  224.                  \vtop{\copy0 \offinterlineskip
  225.                        \smallskip
  226.                        \hbrule
  227.                        \hbox to \wd0{\vbrule height \ht8 
  228.                                      \boxpoint \hss
  229.                                      \hskip 4pt\copy8 \hss
  230.                                      \vbrule height \ht8}
  231.                        \hbrule 
  232.                        \hbox to \wd0{\vbrule height \ht6 \hss
  233.                                      \copy6 \hss
  234.                                      \vbrule height \ht6}
  235.                        \hbrule
  236.                        } 
  237.                      \vtop{\hrule height 0pt
  238.                            \vskip 1in
  239.                            \hbox{\qquad \vrule height 6pt width 8pt depth 2pt
  240.                                  \quad $\Leftarrow$ Reference Point}
  241.                            \vskip 62pt
  242.                            \hbox{$\Leftarrow$ Baseline}}
  243.                      \hss}\medskip}
  244. \def\ftn{}
  245. \hfuzz=5pt
  246. \let\prule=\relax \let\ptrule=\relax
  247. \marginnotesfalse
  248. \ejectpag
  249.